import { getRequest, postRequest, putRequest, deleteRequest } from '/@/lib/axios';

/**
 * 流程部署相关的 API 接口集合
 */

export const deployApi = {
  // 查询流程部署列表
  listDeploy: (query) => getRequest('/workflow/deploy/list', query),
  // 查询发布流程列表
  listPublish: (query) => getRequest('/workflow/deploy/publishList', query),
  // 获取流程模型流程图
  getBpmnXml: (definitionId) => getRequest('/workflow/deploy/bpmnXml/' + definitionId),
  // 修改流程状态
  changeState: (params) => putRequest('/workflow/deploy/changeState', params),
  // 删除流程部署
  delDeploy: (deployIds) => deleteRequest('/workflow/deploy/' + deployIds),
};
